package com.alipay.app.groupmeal.standard.ui.c.pre;

import android.os.Build;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.alipay.app.groupmeal.standard.R;
import com.alipay.app.groupmeal.standard.base.BasePresentation;
import com.alipay.app.groupmeal.standard.ui.c.abcp.CPayingAbcpActivity2;

public class QrPayResMainPre extends BasePresentation {

    private CPayingAbcpActivity2 mActivity;

    private LinearLayout errLinear;
    private LinearLayout successLinear;
    private TextView msgTv;

    public QrPayResMainPre(CPayingAbcpActivity2 outerContext, Display display) {
        super(outerContext, display);
        mActivity = outerContext;
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
        } else {
            getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
        }
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_pay_res_ft2;
    }

    @Override
    protected void initView() {
        errLinear = findViewById(R.id.errLinear);
        successLinear = findViewById(R.id.successLinear);
        msgTv = findViewById(R.id.msgTv);

    }

    @Override
    protected void initData() {

    }

    public void showError(String msg) {
        errLinear.setVisibility(View.VISIBLE);
        successLinear.setVisibility(View.GONE);
        msgTv.setText(msg);
    }
}
